package com.binyong.redis.common;

import com.binyong.Util.RedisUtil;
import com.binyong.constant.RedisConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * redis 公共方法
 * @author binyong
 *
 */
@Component
@Slf4j
public class RedisCommonUtils {
	
	@Resource
    private RedisUtil redisUtil;


    /**
     * 将消息发送给对应的监听队列
     * @param msg
     */
    public void hello(String msg) {
        redisUtil.convertAndSend(RedisConstant.msg_queue,msg);
    }
}
